#{extends 'mainPrivate.html' /}
#{set title:'Mon profil' /}
#{set selectmonprofil :'active'/}
<script src="@{'/public/javascripts/monprofil.js'}" type="text/javascript" charset="${_response_encoding}"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha1.js"></script>

<div class="ui black raised segment">
    <div class="ui black ribbon label">Mon profil</div>

    <form id="formProfil" method="post" action="">
        <div id="message_success_modify_profil" class="ui primary inverted blue segment">Votre profil a bien été modifié</div>
        <div id="message_failed_modify_profil" class="ui primary inverted red segment">Il y a une erreur de mise à jour de votre profil</div>
        <div class="ui form segment">
            <div class="two fields ui message">
                <div class="field">
                    <label>Prénom</label>
                    <input name="prenom" type="text" value="${prenom}">
                </div>
                <div class="field">
                    <label>Nom</label>
                    <input name="nom" type="text" value="${nom}">
                </div>
            </div>
            <div class="ui blue message">

            <div class="two fields ui blue message">
                <div class="field">
                    <label>Date de naissance</label>
                    <input name="date" id="date" type="text" value="${dateNaissance.format('dd/MM/yyyy')}">
                </div>
                <div class="field">
                    <label>Sexe</label>
                    <div id="sexe_dropdown" class="ui fluid selection dropdown">
                        <input name="sexe" type="hidden">
                        <div id="default_sexe_value" class="default text">${sexe}</div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <div class="item" data-value="M">M</div>
                            <div class="item" data-value="F">F</div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="field">
                <label>Email</label>
                <input placeholder="${email}" name="email" type="text" readonly="readonly">
            </div>
            <div class="field ui blue message">
                <label>Nouveau mot de passe</label>
                <input id="password_monprofil" type="password" name="new_password" value=${motDePasse}>
            </div>
            <div class="field ui blue message">
                <label>Confirmer mot de passe</label>
                <input type="password" name="confirm_password" value=${motDePasse}>
            </div>
        </div>

        <input type="submit" id="boutonModifierProfil" class="ui small blue button" name="boutonModifierProfil" value="Modifier"/>
        </div>
    </form>
</div>